package com.itheima.ydd.controller;

import com.itheima.ydd.common.ResultData;
import com.itheima.ydd.service.ISysConfigService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2022-05-22
 */
@RestController
@RequestMapping("/sys_config")
@CrossOrigin
@Slf4j
public class SysConfigController {

    @Autowired
    private ISysConfigService sysConfigService;

    @PostMapping("/add")
    public ResultData add(){

        return null;
    }

    /**
     * @description: 获取所有配置信息
     * @author: 黄伟兴
     * @date: 2022/9/8 11:21
     * @param: []
     * @return: com.itheima.ydd.common.ResultData
     **/
    @GetMapping("/all")
    public ResultData getAll(){
        return sysConfigService.getAll();
    }


}
